import { useAppContext } from "@/components/AppContext"
import {Button} from "antd";
import {ActionType} from "@/reducers/AppReducer";
import {SunOutlined} from "@ant-design/icons";


export default function Toolbar() {
    const {
        state: { themeMode },
        dispatch
    } = useAppContext()
    return (
        <div className='absolute bottom-0 left-0 right-0  flex p-2 justify-between'>
        <Button icon={<SunOutlined />} onClick={() => {
          dispatch({
            type: ActionType.UPDATE,
            field: "themeMode",
            value: themeMode === "dark" ? "light" : "dark"
          })
        }}>

        </Button>


        </div>
    )
}
